package com.dd.cloud.user.mapper.drugs;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.drugs.DrugsWarehousing;
import com.dd.cloud.user.req.drugs.DrugsQtyPageReq;
import com.dd.cloud.user.req.drugs.DrugsWarePageReq;
import com.dd.cloud.user.res.drugs.DrugsQtyPageRes;
import com.dd.cloud.user.res.drugs.DrugsQtyRes;
import com.dd.cloud.user.res.drugs.DrugsWarePageRes;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 药品入库记录表 Mapper 接口
 * </p>
 *
 * @author czg
 * @since 2023-04-18
 */
public interface DrugsWarehousingMapper extends BaseMapper<DrugsWarehousing> {

    /**
     * 查询药材入库记录
     */
    Page<DrugsWarePageRes> getDrugsWarePage(Page<DrugsWarePageRes> page, DrugsWarePageReq req);

    /**
     * 查询药材库存列表
     */
    Page<DrugsQtyPageRes> getDrugsQtyPage(Page<DrugsQtyPageRes> page, DrugsQtyPageReq req);

    /**
     * 查询药品库存
     */
    List<DrugsQtyRes> getDrugsIsHaveQty(@Param("drugNums") String[] drugNums,
                                        @Param("pharFlag") Integer pharFlag);
}
